<tr>
  <th rowspan=10><%= l('cmi.label_cost') %></th>
   <th rowspan="3"><%= l('cmi.label_done') %></th>
   <td><%= l('cmi.label_RRHH') %></td>
   <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'budget_spent_rrhh') %>€ </td>
      <% set_cost_value('rrhh_i', report, 'budget_real_rrhh','budget_spent_rrhh') %>
   <% end %>
</tr>
<tr>
   <td><%= l('cmi.label_others') %></td>
   <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'Gastado') %>€ </td>
      <% set_cost_value('others_i', report, 'budget_spent', 'Gastado') %>
   <% end %>
</tr>
<tr>
   <td><%= l(:label_total) %></td>
   <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'budget_spent') %>€ </td>
      <% set_cost_value('i', report, 'budget_real', 'budget_spent') %>
   <% end %>
</tr>
<tr>
  <th rowspan=3><%= l('cmi.label_remaining') %></th>
  <td><%= l('cmi.label_RRHH') %></td>
  <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'budget_remaining_rrhh') %>€ </td>
      <% set_cost_value('rrhh_r', report, 'budget_remaining', 'budget_remaining_rrhh') %>
  <% end %>
</tr>
<tr>
  <td><%= l('cmi.label_others') %></td>
  <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'budget_remaining_rrmm_and_others') %>€ </td>
      <% set_cost_value('others_r', report, 'budget_remaining', 'budget_remaining_rrmm_and_others') %>
  <% end %>
</tr>
<tr>
   <td><%= l(:label_total) %></td>
   <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'budget_remaining') %>€ </td>
   <% end %>
</tr>

<tr>
  <th rowspan=3><%= l('cmi.label_planned') %></th>
  <td><%= l('cmi.label_RRHH') %></td>
  <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'budget_real_rrhh') %>€ </td>
      <% set_cost_value('rrhh_p', report, 'budget_real', 'budget_real_rrhh') %>
  <% end %>
</tr>
<tr>
   <td><%= l('cmi.label_others') %></td>
   <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'Presupuesto actual') %>€ </td>
      <% set_cost_value('others_p', report, 'budget_real', 'Presupuesto actual') %>
   <% end %>
</tr>
<tr>
   <td><%= l(:label_total) %></td>
   <% @names.each do |report| %>
      <td class="issue"><%= get_report_value(report, 'budget_real') %>€ </td>
   <% end %>
</tr>
<tr>
  <th colspan="2"><%= l('cmi.label_graphs') %></th>
  <% @names.each do |report| %>
    <td class="issue">
      <img src="http://chart.apis.google.com/chart?cht=bhs&chd=t:<%=instance_variable_get("@cost_rrhh_i_#{report}")%>,<%=instance_variable_get("@cost_others_i_#{report}")%>,<%=instance_variable_get("@cost_i_#{report}")%>|100,100,100&chco=4D89F9,C6D9FD&chbh=10,5,10&chs=250x70&chxt=x,y&chxl=0:|0|50|100|1:|Total: <%=instance_variable_get("@cost_i_#{report}")%>%|Otros: <%=instance_variable_get("@cost_others_i_#{report}")%>%|RRHH: <%=instance_variable_get("@cost_rrhh_i_#{report}")%>%|"/>
      <img src="http://chart.apis.google.com/chart?cht=p3&chd=t:<%=instance_variable_get("@cost_rrhh_p_#{report}")%>,<%=instance_variable_get("@cost_others_p_#{report}")%>&chs=250x50&chl=RRHH: <%=instance_variable_get("@cost_rrhh_p_#{report}")%>%|Otros: <%=instance_variable_get("@cost_others_p_#{report}")%>%|"/>
    </td>
   <% end %>
</tr>
